from django.db import models
from django.utils import timezone


class FlashPayUser(models.Model):
    openid = models.CharField(max_length=64, db_index=True)
    union_id = models.CharField(max_length=64, unique=True)
    access_token = models.CharField(max_length=256)
    expires = models.DateTimeField()
    create_time = models.DateTimeField(default=timezone)
    objects = models.Manager()

    class Meta:
        verbose_name = "云闪付"
        verbose_name_plural = verbose_name
